package cn.com.api.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.sdicons.json.validator.impl.predicates.Int;

import cn.com.api.entity.ApiU_user_friend_group_detail;
import cn.com.api.mapper.base.U_user_friend_group_detailMapperBase;
import cn.com.util.PageInfo;

//DAO
public interface ApiU_user_friend_group_detailMapper extends U_user_friend_group_detailMapperBase {

	// 新增对象后返回记录ID
	public int U_user_friend_group_detailInsertion(ApiU_user_friend_group_detail u_user_friend_group_detail);

	// 根据条件查询ApiU_user_friend_group_detail对象
	public List<ApiU_user_friend_group_detail> findU_user_friend_group_detailsByMap(@Param("map") Map map,
			@Param("page") PageInfo page);

	// 根据group_id删除所有成员
	public int delU_user_friend_group_detailsByGroup_id(@Param("group_id") String group_id);

	// 根据group_id查询所有成员
	public List<ApiU_user_friend_group_detail> findU_user_friend_group_detailsByGroupID(
			@Param("group_id") String group_id);

	public ApiU_user_friend_group_detail findU_user_friend_group_detailsByGroupIDUserID(
			@Param("group_id") String group_id, @Param("friend_id") String friend_id, @Param("type") Integer type);

	public void delcirclefriendgroupdetail(@Param("group_id") String group_id, @Param("friend_id") String friend_id);

	// 将圈子从所有圈成员的消息组中删除
	public void delcircle(@Param("circle_id") String circle_id);

	// 查看好友在我的哪个消息组里
	public ApiU_user_friend_group_detail findFriendGroupDetailByFriend(@Param("user_id") String user_id,
			@Param("friend_id") String friend_id, @Param("type") Integer type);
}
